//
//  NSUserDefaults+data.m
//  乡易秀商户端
//
//  Created by delicious on 17/9/7.
//  Copyright © 2017年 chen. All rights reserved.
//

#import "NSUserDefaults+data.h"

@implementation NSUserDefaults (data)
+(BOOL)setSaveValue:(id)value forKey:(NSString *)key
{
    if (!value) {
        return NO;
    }
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:value forKey:key];
   return [defaults synchronize];
}

+(BOOL)setSaveBool:(BOOL)value forKey:(NSString *)key
{
    if (!value) {
        return NO;
    }
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setBool:value forKey:key];
    return [defaults synchronize];
}
+(id)getValueForKey:(NSString *)ksy
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    return[defaults objectForKey:ksy];

}
+(void)removeObjectForKey:(NSString *)ksy
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults removeObjectForKey:ksy];
}

@end
